package io.webchat.wdzl.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static java.util.regex.Pattern.compile;

public class IpPortUtil {


    public static String getIp(String path){
        Pattern p = compile("(\\d+\\.\\d+\\.\\d+\\.\\d+)\\:(\\d+)");
        Matcher m = p.matcher(path);
        while (m.find()){
            return m.group(1);
        }
        return null;
    }

}
